<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <script>
            for (var i = 0; i < 10; i++) {
                console.log(i);
            }

            for (var a = 0; a < 5; a++) {
                x = "该数字为 " + a + "<br>";
            }
            document.write(x);
        </script>
    </head>
    <body></body>
</html>